						**Replication Dofile**
					**How Leaders' Prior Combat Experience**
 **Influences the Likelihood of Peace Agreements in Civil Conflicts**
						  **Tappe Ortiz**
			        **Appendix_Robustness Checks**

*Table 3. correlation matrices for model 2**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
correlate leader_combat foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ 

**Table 4. Peace agreements and military service
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*Model 1:  leader rebel combat and experience*
stcrreg leader_rebel leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2:service and no combat*
stcrreg leader_servnocomb leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 5. Peace agreement leader age and combat**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*model 1: leader age*
stcrreg  leader_combat leader_age leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*model 2: interaction age and combat*
stcrreg  leader_combat##c.leader_age leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 6.Peace agreements and leader culpability**
*Model 1: leaders culpable*
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*model 1*
stcrreg leader_combat leader_culpable leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 7. Other conflict outcomes and leader combat****
stset year, failure(peaceorceasefire==1) origin(time year) id(dyadep) exit(year==2015)
**Model 1 Ceasefire and peace agreements**
stcrreg  leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ  if year>1988, robust cluster(dyadid) compete(peaceorceasefire==2)
*model 2: did it end in victories for one side?*		
stset year, failure(Victory_one_side==1) origin(time year) id(dyadep) exit(year==2015)
stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(Victory_one_side==2)
*model 3: did it end in victories for rebels*
stset year, failure(Victory_rebels==1) origin(time year) id(dyadep) exit(year==2015)
stcrreg leader_combat leader_leadershipchange foreignint strength  intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(Victory_rebels==2)	

**Table 8. Specific conflicts**
*Model 1 coups*
keep if coups == 1
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
stcrreg leader_combat leader_leadershipchange foreignint  strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
clear
*Model 2 Excluding territorial conflicts*
keep if war_over_territory == 0
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
stcrreg leader_combat leader_leadershipchange foreignint strength intensity dyad_count no_negotiations lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)
clear


**Table 9. Ideologies**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*model 1 ethnic*
stcrreg leader_combat ethnic_con leader_leadershipchange  foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2 religious*
stcrreg leader_combat relig_con leader_leadershipchange  foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 3 marxist*
stcrreg leader_combat marxistsocialist_2  leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ  if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)


**Table 10. other conditions around peace agreements**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*Model 1 Years since last negotiations*
stcrreg leader_combat ln_negyears_2 leader_leadershipchange foreignint strength intensity territory dyad_count  lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2 Negotiations ever*
stcrreg leader_combat negotiations_ever_2 leader_leadershipchange foreignint strength intensity territory dyad_count  lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 3 Mediation*
stcrreg leader_combat mediation leader_leadershipchange foreignint strength intensity territory dyad_count lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 4 Strong concessions*
stcrreg leader_combat no_concessions_strong_2 leader_leadershipchange foreignint strength intensity territory  dyad_count lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 11, other country level CV**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*Model 1 population*
stcrreg leader_combat ln_population leader_leadershipchange  foreignint  strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2 ethnic fractionalization*
stcrreg leader_combat  ethnic leader_leadershipchange foreignint  strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 3 gender parity*
stcrreg leader_combat  parity leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 12, other organizational CV for rebel groups**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*model 1 organizational capacity *
stcrreg leader_combat legalwing leader_leadershipchange  foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2  allgems*
stcrreg leader_combat allgems_2 leader_leadershipchange  foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 13, other state leader CV**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*model 1 years of experience prior to leadership*
stcrreg leader_combat leader_yrsexperience leader_leadershipchange foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*model 2 levels of education*
stcrreg leader_combat leader_leveledu leader_leadershipchange foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*model 3 health*
stcrreg leader_combat leader_physhealth leader_mentalhealth leader_leadershipchange foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*model 4 occupation*
stcrreg leader_combat leader_careerpolitician leader_leadershipchange foreignint strength intensity territory  dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 14 rebel combat and state combat**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
*Model 1*
stcrreg leader_combat rebel_combat leader_leadershipchange rebel_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)
*Model 2 interaction*
stcrreg leader_combat##rebel_combat leader_leadershipchange rebel_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988, robust cluster(dyadid) compete(peaceagree_all==2)

**Table 15 logit test**
* Model 1*
logit peaceagree leader_combat leader_leadershipchange  foreignint  strength intensity territory dyad_count no_negotiations lnGDP2 democ, cluster (dyadid)

**Table 16 rare event logistic regressions**
*Model 1 *
relogit change_combat rebel_deaths_2 time time2 time3,cluster(dyadid)
* model 2 high costs*
relogit change_combat rebel_deaths_2 time time2 time3 if weak==1,cluster(dyadid)
* Model 3: low costs*
relogit change_combat rebel_deaths_2 time time2 time3 if weak==0,cluster(dyadid)


*Table 18*
levelsof leader_name, local(leaders)
local num_leaders : word count `leaders'
matrix results = J(`num_leaders', 3, .)
local i = 1
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
foreach leader of local leaders { 
	di "Processing leader `leader'"
 * Define the regression command, excluding the current leader from the analysis
    stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if year>1988 & leader_name != "`leader'", robust cluster(dyadid) compete(peaceagree_all==2)
   matrix results[`i', 1] = _b[leader_combat]
   matrix results[`i', 2] = _se[leader_combat]
   matrix results[`i', 3] = `i'

    
    local i = `i' + 1
} 

matrix list results

*Table 19 and more information on the leaders who terminated conflict*
stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Yudhoyono", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Seibou", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Nguesso", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Olmert", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Rahmon", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "FRANCOIS BOZIZE", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "DEBY", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "CHISSANO", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Joseph Kabila", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Nkurunziza", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Salva Kiir", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Rabin", robust cluster(dyadid) compete(peaceagree_all==2)

stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ if leader_name != "Doe", robust cluster(dyadid) compete(peaceagree_all==2)

**Case selection**
stset year, failure(peaceagree_all==1) origin(time year) id(dyadep) exit(year==2015)
stcrreg leader_combat leader_leadershipchange foreignint strength intensity territory dyad_count no_negotiations lnGDP2 democ, robust cluster(dyadid) compete(peaceagree_all==2)
**Figure II peace agreements**
predict df*, dfbeta
twoway scatter df1 year if peaceagree_all==1 & leader_combat==1, yline(0) mlabel(leader_name)
list  df1 year leader_name leader_combat year_country if peaceagree_all==1 & leader_combat==1
  			
